package com.demohomework.homeworkdemo.service.impl;

import com.demohomework.homeworkdemo.mapper.NoticeMapper;
import com.demohomework.homeworkdemo.pojo.Notice;
import com.demohomework.homeworkdemo.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {
    @Autowired
    private NoticeMapper noticeMapper;

    @Override
    public void add(Notice notice) {
         noticeMapper.add(notice);
    }

    @Override
    public List<Notice> list() {
        return noticeMapper.list();
    }

    @Override
    public Notice findId(Integer id) {
        return noticeMapper.findId(id)  ;
    }

    @Override
    public void update(Notice notice) {
         noticeMapper.update(notice);
    }

    @Override
    public void delete(Integer id) {
        noticeMapper.delete(id);
    }
}
